package testy;
import java.awt.BorderLayout;

import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
import javax.swing.WindowConstants;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class TreeShow extends javax.swing.JFrame {
	
	private static final Logger log = LoggerFactory.getLogger(TreeShow.class);
	
	private JScrollPane jScrollPane1;
	private JOptionPane jOptionPane1;
	private JTree jTree1;

	/**
	* Auto-generated main method to display this JFrame
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
//				TreeShow inst = new TreeShow();
//				inst.setLocationRelativeTo(null);
//				inst.setVisible(true);
			}
		});
	}
	
	public TreeShow(JTree ok) {
		super();
		initGUI(ok);
	}
	
	private void initGUI(JTree ok) {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				jScrollPane1 = new JScrollPane();
				getContentPane().add(jScrollPane1, BorderLayout.CENTER);
				{
					jOptionPane1 = new JOptionPane();
					jScrollPane1.setViewportView(jOptionPane1);
				}
				{
					jTree1 = ok;
					jScrollPane1.setViewportView(jTree1);
				}
			}
			pack();
			setSize(400, 300);
		} catch (Exception e) {
			log.error("", e);
		}
	}

	public JTree getJTree1() {
		return jTree1;
	}

	public void setJTree1(JTree tree1) {
		jTree1 = tree1;
		getContentPane().repaint();
	}

}
